Skip to content

fix(mobile): retry MFA/auth on transport/IO aborts (stale-connection) — ported to main#87

Merged
ahmetabdullahgultekin merged 1 commit into
mainfrom
fix/mfa-retry-stale-connection-rebased-2026-06-06
Jun 6, 2026
Merged

fix(mobile): retry MFA/auth on transport/IO aborts (stale-connection) — ported to main#87
ahmetabdullahgultekin merged 1 commit into
mainfrom
fix/mfa-retry-stale-connection-rebased-2026-06-06

Conversation

@ahmetabdullahgultekin

Copy link
Copy Markdown
Contributor

Lands a stranded reliability fix: fix/mfa-request-retry-stale-connection (1 ahead / 24 behind main) was never merged or shipped (git cherry confirms it's absent from main and v5.3.0, and main had no retry mechanism). Ported onto current main, resolving the NetworkModule.kt conflict.

Change: the identity HttpClient installs Ktor HttpRequestRetry (maxRetries=2, exponential backoff) that retries only on transport/IO exceptions (IOException / SocketTimeout / ConnectTimeout / ClosedReceiveChannelException) — never on 4xx/5xx, so a consumed MFA code is never resubmitted; the request body is serialized and fully replayable.

Fixes the OkHttp HTTP/2 stale-connection abort the server logged as "Malformed request body: I/O error while reading input message" (previously misdiagnosed as slow-uplink truncation).

Verified: :shared:compileDebugKotlinAndroid passes (JDK 21, Ktor 3.1.1). Identical retry logic to the original fix commit c1a758a7. Reaches devices on the next APK build (separate operator step). Found via scripts/drift-check.sh.

🤖 Generated with Claude Code

…nnection)

Ports the stranded fix from fix/mfa-request-retry-stale-connection (was 24
commits behind main, never merged or released) onto current main, resolving
the NetworkModule.kt conflict.

The identity HttpClient now installs Ktor HttpRequestRetry (maxRetries=2,
exponentialDelay) that retries ONLY on transport/IO exceptions (IOException /
SocketTimeout / ConnectTimeout / ClosedReceiveChannelException) — never on
4xx/5xx, so a consumed MFA code is never resubmitted; the body is a serialized
object, fully replayable. Fixes the OkHttp h2 stale-connection abort that the
server logged as "Malformed request body: I/O error while reading input
message" (misdiagnosed as slow-uplink truncation).

Verified: :shared:compileDebugKotlinAndroid passes (JDK 21, Ktor 3.1.1).
Reaches devices on the next APK build. Surfaced by scripts/drift-check.sh.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ahmetabdullahgultekin ahmetabdullahgultekin merged commit 77254cc into main Jun 6, 2026
3 checks passed
@ahmetabdullahgultekin ahmetabdullahgultekin deleted the fix/mfa-retry-stale-connection-rebased-2026-06-06 branch June 6, 2026 13:41
ahmetabdullahgultekin added a commit that referenced this pull request Jun 6, 2026
…tion retry fix (#88)

v5.3.0 (versionCode 12) shipped without the Ktor HttpRequestRetry fix
(#87, now on main). Bump to 5.3.1 / code 13 so the next CI-signed APK
upgrades in place over v5.3.0 and carries the transport/IO retry.

Signed APK is produced by the android-build.yml workflow (build_type=release,
keystore secrets held in GitHub).

Co-authored-by: Ahmet Abdullah Gultekin <rollingcat.help@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ahmetabdullahgultekin added a commit that referenced this pull request Jun 6, 2026
…otes (#89)

- CHANGELOG: promote [Unreleased] → [5.3.1] - 2026-06-06; add the MFA
  transport/IO retry fix (#87, headline) and cross-device/session fixes (#86)
  that had landed post-5.3.0 without changelog entries; keep the #82/#83 items.
- CLAUDE.md: refresh stale "Latest: v5.2.3 / versionCode 10" → "v5.3.1 /
  versionCode 13"; document the CI signed-build command (host has no keystore
  pw); add a "v5.3.1 — MFA stale-connection retry" section.

Co-authored-by: Ahmet Abdullah Gultekin <rollingcat.help@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant